
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __SKHYNIX_DISPLAY_H
#define __SKHYNIX_DISPLAY_H

/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define	LCD_SCREEN_WIDTH	320
#define	LCD_SCREEN_HEIGHT	480
#define	LCD_DIR_HORZONTAL	0
#define	LCD_DIR_VERTICAL	1
#define	LCD_ALIGN_LEFT		0
#define	LCD_ALIGN_CENTER	1
#define	LCD_ALIGN_RIGHT		2
#define	LCD_CHAR_WIDTH		16
#define	LCD_CHAR_HEIGHT		24
#define	LCD_MAX_CHAR		20	// LCD_SCREEN_WIDTH / LCD_CHAR_WIDTH
#define	LCD_MAX_LINE		20	// LCD_SCREEN_HEIGHT / LCD_CHAR_HEIGHT
/* Exported types ------------------------------------------------------------*/
typedef u32					COLORREF;
/* Exported macro ------------------------------------------------------------*/
#define RGB(r,g,b)			((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
#define RGB_R(rgb)			(LOBYTE((rgb)>>16))
#define RGB_G(rgb)			(LOBYTE(((WORD)(rgb)) >> 8))
#define RGB_B(rgb)			(LOBYTE(rgb))
#define	COLOR_BLACK			RGB(0,0,0)
#define	COLOR_GRAY			RGB(128,128,128)
#define	COLOR_SILVER		RGB(192,192,192)
#define	COLOR_WHITE			RGB(255,255,255)
#define	COLOR_MAROON		RGB(128,0,0)
#define	COLOR_RED			RGB(255,0,0)
#define	COLOR_OLIVE			RGB(128,128,0)
#define	COLOR_YELLOW		RGB(255,255,0)
#define	COLOR_GREEN			RGB(0,128,0)
#define	COLOR_LIME			RGB(0,255,0)
#define	COLOR_TEAL			RGB(0,128,128)
#define	COLOR_AQUA			RGB(0,255,255)
#define	COLOR_NAVY			RGB(0,0,128)
#define	COLOR_BLUE			RGB(0,0,255)
#define	COLOR_PURPLE		RGB(128,0,128)
#define	COLOR_FUCHSIA		RGB(255,0,255)
/* Exported functions ------------------------------------------------------- */
void Display_Init(void);

void LcdDrawRect(u16 x, u16 y, u16 cx, u16 cy, COLORREF cr);
void LcdDrawLine(u16 x, u16 y, u16 len, u8 dir, COLORREF cr);
void LcdDrawChar(u16 x, u16 y, char ch, COLORREF crT, COLORREF crB);

void LcdDispChar(u8 tx, u8 ty, char ch, COLORREF crT, COLORREF crB);
void LcdDispString(u8 tx, u8 ty, char *str, COLORREF crT, COLORREF crB);
void LcdLineString(u8 line, u8 align, char *str, COLORREF crT, COLORREF crB);


#endif  /* __SKHYNIX_DISPLAY_H */
